import java.util.Scanner;

public class Main {
//    public static void solve(String str1, String str2) {
//
//    }
//    public static void main(String[] args) {
//        Scanner sc = new Scanner(System.in);
//        String str1 = sc.nextLine();
//        String str2 = sc.nextLine();
//        System.out.println(solve(str1,str2));
//    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str1=in.nextLine();
        String str2=in.nextLine();
        StringBuilder stringBuilder=new StringBuilder();
        for (int i = 0; i < str1.length(); i++) {
            char c = str1.charAt(i);
            // 检查该字符是否存在于第二个字符串中
            if (str2.indexOf(c) == -1) {
                // 如果不存在，则添加到结果中
                stringBuilder.append(c);
            }
        }
        System.out.println(stringBuilder);
    }
}